<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<script type="text/javascript">
	$(document).ready(function() {
		if($('#type_acc_buyer').attr('checked')){
			$('#show_buyer_option').show();
		}else{
			$('#show_buyer_option').hide();
		}
		
	/*	if($('#agree_term_n_conditional').attr('checked')){
			$('#after_agreement').show();
		}else{
			$('#after_agreement').hide();
		}	
	*/	
		if($('#checkall_music').attr('checked')){
			$('input[name="music_genre[]"]').attr('checked',true);
		}else{
			$('input[name="music_genre[]"]').attr('checked',false);
		}
		
		$('#checkall_music').click(function(){
			if($('input[name="music_genre[]"]').attr('checked')){
				$('input[name="music_genre[]"]').attr('checked',false);
			}else{
				$('input[name="music_genre[]"]').attr('checked',true);
			}
		});
		
		$('#buyer_type').live('change',function(){
			if($('#buyer_type').val() == 'corporate_brand'){
				$('#company_label').html('<span class="red">*</span>Company Website:');
			}else{
				$('#company_label').html('Company Website:');
			}
		});
		if($('#buyer_type').val() == 'corporate_brand'){
			$('#company_label').html('<span class="red">*</span>Company Website:');
		}else{
			$('#company_label').html('Company Website:');
		}
	});
	
	function agree_term(checked){
		if(checked){
			$('#after_agreement').show();
			
		}else{
			$('#after_agreement').hide();
			
		}
	}
	function openTermAndConditional(){
		$('#term_and_conditional').dialog(
			{
				 width: 1000,
				 resizable: false,
				 height:550,
			}
		);
	}
	
</script>

<div id="center-wrap" class="ui-corner-tl ui-corner-tr">
<form action="<?php echo site_url('user/submit');?>" name="user_signin" id="user_signin" method="post" enctype="multipart/form-data" >
	
	<h1 class="bold capitalize">User registration</h1>
	
	<div class="clrboth"></div>
	
	<div class="row">
		<div class="column grid_1">
			<p>Choose type:</p>
		</div>
		 
		<div class="column grid_1">
			<input type="radio" name="type_acc" id="type_acc_seller" value="seller" onclick="javascript:$('#buyer_zone').hide();$('#seller_zone').show();" /> Seller
		</div>
		<div class="column grid_1">
			<input type="radio" checked="checked" name="type_acc" id="type_acc_buyer" value="buyer" onclick="javascript:$('#buyer_zone').show();$('#seller_zone').hide();" /> Buyer
		</div>
		<div class="column grid_3 hidden" id="type_acc_error">
			<span class="red">Please choose type of account. </span>
		</div>
		
		<div class="clrboth"></div>			
	</div>
	<div class="clrboth"></div>
	
	<div class="row" id="buyer_zone">
		<div class="clrboth"></div>
		<div class="bold board-signal">Background information</div>
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>Buyer Type:
		</div>
		<div class="column grid_4">
			<?php echo $items['buyer_type'];?>
		</div>
		<div class="column grid_1 hidden" id="buyer_type_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		<div class="column grid_3">
			<span class="red">*</span>Email:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="100" name="email" id="email" value="" class="inputText" />
		</div>
		<div class="column grid_1 hidden" id="email_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>First name:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="100" name="first_name" id="first_name" value="" class="inputText" />
		</div>
		<div class="column grid_1 hidden" id="first_name_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>Last name:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="100" name="last_name" id="last_name" value="" class="inputText" />
		</div>
		<div class="column grid_1 hidden" id="last_name_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>Job title:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="100" name="job_title" id="job_title" value="" class="inputText" />
		</div>
		<div class="column grid_1 hidden" id="job_title_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>Company/Organization:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="company" id="company" value="" class="inputText" />
		</div>
		<div class="column grid_1 hidden" id="company_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3" id="company_label">
			Company Website:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="company_url" id="company_url" value="" class="inputText" />
		</div>
		<div class="column grid_1 hidden" id="company_url_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
			
		<div class="column grid_3">Upload profile of company (optional):</div>
		<div class="column grid_5">
			<?php echo form_upload('company_profile',"", 'id="company_profile" size="40"');?>
			
			<div class="clrboth"></div>
			<span class="hidden" id="company_profile_error"><span class="red">File upload missing.</span><br />
				Max file allow: <?php echo allowMaxFileSize();?> MB. <br/>
				Allow extension: <?php echo implode( ', ',allowExtensionFileDocumentUpload() );?>
			</span>
		</div>
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>Country:
		</div>
		<div class="column grid_4">
			<?php echo $items['country'];?>
		</div>
	
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>Address Line 1:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="address_line_1" id="address_line_1" value="" class="inputText" />
		</div>
		<div class="column grid_1 hidden" id="address_line_1_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Address Line 2:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="address_line_2" id="address_line_2" value="" class="inputText" />
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>City:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="city" id="city" value="" class="inputText" />
		</div>
		<div class="column grid_1 hidden" id="city_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>State:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="state" id="state" value="" class="inputText" />
		</div>
		<div class="column grid_3 hidden" id="state_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>Zip (postal code):
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="20" name="zip" id="zip" value="" class="inputText" />
		</div>
		<div class="column grid_3 hidden" id="zip_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			<span class="red">*</span>Work Phone:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="20" name="work_phone" id="work_phone" value="" class="inputText" />
		</div>
		<div class="column grid_3 hidden" id="work_phone_error">
			<span class="red">Required field.</span>
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Mobile:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="20" name="mobile" id="mobile" value="" class="inputText" />
		</div>
		
		<div class="clrboth"></div>
		<div class="bold board-signal">Business interests</div> 
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Show Type:
		</div>
		<div class="column grid_5">
			<div style="border:1px solid #cccccc;padding:5px;margin:5px 0px;">
				<?php echo $items['show_type'];?>
			</div>	
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Country of Origin:
		</div>
		<div class="column grid_5" style="margin-top:10px;">
			<div style="border:1px solid #cccccc;padding:5px;margin:5px 0px;">
				<?php echo $items['country_origin'];?> 
			</div>	
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Music Genre:
		</div>
		<div class="column grid_5" style="margin-top:10px;">
			<div style="border:1px solid #cccccc;padding:5px;margin:5px 0px;">
				<?php echo $items['music_genre'];?>
			</div>		
		</div>
		<div class="clrboth"></div>
	<!--
		<div class="bold board-signal">Bank Information</div> 
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			&nbsp;
		</div>
		
		<div class="column grid_5" style="text-align:justify;margin-bottom: 15px;">
			<p class="bold">
				Please note that in lieu of international anti-money laundering laws and practices, 
				all transactions conducted within the site using J.P Morgan's exclusive escrow services 
				will need full transparency of all company accounts to be disclosed.  

				Monies will only be accepted, escrowed and transferred accordingly via 
				the buyers ID and sellers ID which both would require a set of fixed banking account
				and information which the transfers are then permitted to take place. 

				Upon receiving your details above, 
				we will be sending you an account information form from J.P Morgan 
				to complete the membership to this site.
			
			</p>
		</div>
		-->
		<div class="clrboth"></div>
	<!--	
		<div class="column grid_3">
			Name of Account:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="bank_name_acc" id="bank_name_acc" value="" class="inputText" />
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Account No:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="bank_acc_no" id="bank_acc_no" value="" class="inputText" />
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Bank Name:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="bank_name" id="bank_name" value="" class="inputText" />
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Bank Address:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="bank_address" id="bank_address" value="" class="inputText" />
		</div>
		
		<div class="clrboth"></div>
		
		<div class="column grid_3">
			Swift Code:
		</div>
		<div class="column grid_4">
			<input type="text" maxlength="200" name="swift_code" id="swift_code" value="" class="inputText" />
		</div>
		
		<div class="clrboth"></div>
	-->	
<!--		<div class="column grid_3">
			&nbsp;
		</div>
		<div class="column grid_4">
			<input type="checkbox" name="agree_term_n_conditional" id="agree_term_n_conditional" checked="checked" onclick="agree_term(this.checked);" /> 
			&nbsp;&nbsp; 
			<a href="javascript:void(0);" onclick="openTermAndConditional();" >I agree of this term and conditions.</a>
		</div>
	-->	
		<div class="clrboth"></div>
		
		<div id="after_agreement" >
			<div class="column grid_3">
				<?php echo $items['captcha'];?>
				<input id="captcha_md5" value="<?php echo $items['capchaMD5'];?>" type="hidden" />
			</div>
			 
			<div class="column grid_4" style="margin-top:5px;">
				<input type="text" id="captcha" name="captcha" value="" maxlength="10" class="inputText" />
			</div>
			<div class="column grid_1 hidden" id="captcha_error">
				<span class="red">Missing Image Text.</span>
			</div>
		 
			<div class="clrboth"></div>
			
			<div class="column grid_3">
				&nbsp; 
			</div>
			
			<div class="column grid_4">
				<input type="submit" id="setup_acc" name="setup_acc" value="Setup Account" class="ui-corner-all button-yellow" />
				&nbsp;	&nbsp;&nbsp;
				<?php echo loader_image(" class='hidden' id='loader' ");?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_9">
				<div id="afterSubmit"></div>
			</div>
		</div>
	</div>
	<div class="clrboth"></div>
	
	<div class="row hidden" id="seller_zone" style="margin-top:20px;">
		<div class="column grid_9">
			Thank you for your interest in selling through our portal <br/>

			To maintain our commitment to uphold the integrity of the community of buyers and sellers that trades using the portal, 
			<br/>
			all new sellers will be processed outside of the system, but in direct contact with Soteria Holdings Pte Ltd, owner of Showbiz Exchange

			<br/>
			Kindly bear with us as we liaise directly with you to process your application and interest
			<br/>
			To proceed, please send us an email via 
			<a href="mailto:sellers@showbiz-exchange.com ">sellers@showbiz-exchange.com </a>

			<br/>	
			We look forward to welcoming you at the Showbiz Exchange

		</div>
	</div>
</form>	
<div class="clrboth"></div>

<div id="term_and_conditional" title="Term and conditions" class="hidden" style="padding:10px 30px;">
	{pyro:getpost:body id="22"}	
</div>

</div>
<div class="clrboth"></div>

